<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="format-detection" content="telephone=no,email=no,adress=no">
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath() %>/js/easyui/themes/metro/easyui.css" type="text/css" rel="stylesheet"/>
<link href="<%=request.getContextPath() %>/js/date/skin/WdatePicker.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/easyui/easyui.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/date/WdatePicker.js"></script>
<script type="text/javascript">

$(function(){

	$("#dataTable").datagrid({
		toolbar: '#dataSearch',
		fitColumns:true,
		striped: true, 
		singleSelect:false,
		pagination:true,
		rownumbers:true,
		SelectOnCheck:true,
		CheckOnSelect:true,
        onSelect: function(index,row){
        	var nos="";
        	var rows = $('#dataTable').datagrid('getSelections');
        	for(var i=0; i<rows.length; i++){
        		nos=nos+rows[i].ck+",";
        	}
			$("#keys").val(nos);
    	},
    	onUnselect: function(index,row){
        	var nos="";
        	var rows = $('#dataTable').datagrid('getSelections');
        	for(var i=0; i<rows.length; i++){
        		nos=nos+rows[i].ck+",";
        	}
			$("#keys").val(nos);
    	},
    	onSelectAll: function(rows){
        	var nos="";
        	for(var i=0; i<rows.length; i++){
        		nos=nos+rows[i].ck+",";
        	}
			$("#keys").val(nos);
    	},
    	onUnselectAll: function(rows){
			$("#keys").val("");
    	}
	});
	
	$('#dataTable').datagrid('getPager').pagination({
		total:<s:property value="pageInfo.pageRecord"/>,
		pageNumber:<s:property value="pageInfo.pageIndex"/>,
		pageSize:<s:property value="pageInfo.pageSize"/>,
		pageList: [20,50,100] ,
		onSelectPage:function(pageNumber,pageSize){  
			toPage(pageNumber,pageSize);
		},
		onRefresh:function(pageNumber,pageSize){  
			location.reload();
		}
	});
	
});

</script>
</head>
<body >
<div id="dataSearch" >    
<form id="sform" action="msm_list.html" method="get" enctype="multipart/form-data">
<table style="width: 100%;">
<tr>
<td height="25" >
	<b>操作说明:xxxxxxxxxx</b> 
</td>
</tr>
<tr><td height="30" >
<s:textfield  id="msmNo" name="msmNo" placeholder="编号"></s:textfield>
<s:textfield  id="msmSign" name="msmSign" placeholder="标识"></s:textfield>
<s:textfield  id="msmMer" name="msmMer" placeholder="关联商户"></s:textfield>
<s:textfield  id="msmTxn" name="msmTxn" placeholder="关联交易"></s:textfield>
<s:textfield  id="msmType" name="msmType" placeholder="类型"></s:textfield>
<s:textfield id="msmAmount" name="msmAmount" placeholder="金额"></s:textfield>
<s:select id="msmState" name="msmState" list="#{'1':'有效','0':'无效'}" headerKey="" headerValue="状态"/>

<s:textfield  id="msmDateTop"  name="msmDateTop" placeholder="日期起"  onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="msmDateTop" format="yyyy-MM-dd"/></s:param></s:textfield>
 - 
<s:textfield  id="msmDateEnd"  name="msmDateEnd" placeholder="日期止"  onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="msmDateEnd" format="yyyy-MM-dd"/></s:param></s:textfield>
<s:textfield  id="msmRemark" name="msmRemark" placeholder="备注"></s:textfield>

<input type="button" class="submit" value="查询搜索" onclick="sform.submit();"/></td>
</tr>
<tr><td><hr/></td></tr>
<tr>
<td height="30" >
	<input type="hidden"  id="keys" name="keys"  value=""/>
		<input type="button" class="submit" value="新增记录" onclick="location.href='<%=request.getContextPath()%>/msm_edit.html'"/>
		<input type="button" class="submit"   value="导出数据"  onclick="if(confirm('确认要执行导出操作吗?')){window.open(location.href.replace('list','export'));}"/>
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" class="submit" value="编号" onclick="toSort('sortField','msmNo')"/>
<input type="button" class="submit" value="标识" onclick="toSort('sortField','msmSign')"/>
<input type="button" class="submit" value="关联商户" onclick="toSort('sortField','msmMer')"/>
<input type="button" class="submit" value="关联交易" onclick="toSort('sortField','msmTxn')"/>
<input type="button" class="submit" value="类型" onclick="toSort('sortField','msmType')"/>
<input type="button" class="submit" value="金额" onclick="toSort('sortField','msmAmount')"/>
<input type="button" class="submit" value="状态" onclick="toSort('sortField','msmState')"/>
<input type="button" class="submit" value="日期" onclick="toSort('sortField','msmDate')"/>
<input type="button" class="submit" value="备注" onclick="toSort('sortField','msmRemark')"/>
		
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" class="submit" value="升序排列" onclick="toSort('sortOrder','true')"/>
		<input type="button" class="submit" value="降序排列" onclick="toSort('sortOrder','false')"/>
</td>
</tr>
</table>
</form>
</div>

<table id="dataTable" style="width: 100%;" class="easyui-datagrid" >
<thead>
<tr>
<th data-options="field:'ck'" checkbox="true"></th>
<th data-options="field:'msmNo', width:'10%',align:'left' , halign: 'left'">编号</th>
<th data-options="field:'msmSign', width:'10%',align:'left' , halign: 'left'">标识</th>
<th data-options="field:'msmMer', width:'10%',align:'left' , halign: 'left'">关联商户</th>
<th data-options="field:'msmTxn', width:'10%',align:'left' , halign: 'left'">关联交易</th>
<th data-options="field:'msmType', width:'10%',align:'left' , halign: 'left'">类型</th>
<th data-options="field:'msmAmount', width:'10%',align:'left' , halign: 'left'">金额</th>
<th data-options="field:'msmState', width:'10%',align:'left' , halign: 'left'">状态</th>
<th data-options="field:'msmDate', width:'10%',align:'left' , halign: 'left'">日期</th>
<th data-options="field:'msmRemark', width:'10%',align:'left' , halign: 'left'">备注</th>
<th data-options="field:'op', width:'100',align:'left' , halign: 'left'">操作</th>

</tr>
</thead>
<tbody>
<s:iterator value="msmList" id="show" status="seq">
<tr>
<td><s:property value="#show.msmNo"/></td>
<td><s:property value="#show.msmNo"/></td>
<td><s:property value="#show.msmSign"/></td>
<td><s:property value="#show.msmMer"/></td>
<td><s:property value="#show.msmTxn"/></td>
<td><s:property value="#show.msmType"/></td>
<td><s:text name="global.format.number"><s:param value="#show.msmAmount"/></s:text></td>
<td><s:if test="#show.msmState==0"><img src="<%=request.getContextPath() %>/image/cancel.png"  /></s:if><s:else><img src="<%=request.getContextPath() %>/image/accept.png"  /></s:else></td>
<td><s:text name="global.format.dateminute"><s:param value="#show.msmDate"/></s:text>
<td><s:property value="#show.msmRemark"/></td>
<td>
<input type="button" value="查看" style="width: 50px;" class="submit" onclick="location.href='<%=request.getContextPath()%>/msm_show.html?msmNo=<s:property value="#show.msmNo"/>'"/>
<input type="button" value="修改" style="width: 50px;"class="submit" onclick="location.href='<%=request.getContextPath()%>/msm_edit.html?msmNo=<s:property value="#show.msmNo"/>'"/>
<input type="button" value="删除" style="width: 50px;"class="submit" onclick="location.href='<%=request.getContextPath()%>/msm_move.html?msmNo=<s:property value="#show.msmNo"/>'"/>
</td>

</tr>
</s:iterator>
</tbody>
</table>
<br/>
<br/>
<br/>
</body>
</html>
